<?php
/**
 * Created by PhpStorm.
 * User: liu
 * Date: 2018/9/26
 * Time: 21:49
 */
try
{
   echo "你进来了";
    $sql1=$_GET["myname"];
    $sql2=$_GET["password"];
    $pdo = new PDO("mysql:dbname=liu;host=127.0.0.1","root","");
    $pdo->exec("SET   'utf8';");
    $sql="INSERT INTO `tb_user`(`name`,`age`) VALUES ('$sql1','$sql2');";
    $res=$pdo->query($sql);

}
catch (Exception $e)
{
    echo "连接失败".$e->getMessage();
}



;
